<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/include.inc.jsp" %>
    <!DOCTYPE html>
    <html>
    <head>
        <%@include file="/WEB-INF/views/layout/miiteen/v1/base.ref.jsp" %>
        <%@include file="/WEB-INF/views/layout/miiteen/v1/page.list.ref.jsp" %>
    </head>
    <body>
    <div class="mainpage">
    
        <!--顶部操作工具栏-->
        <mt-toolbar>
            <shiro:hasPermission name="basicHonorRoll:add">
                <mt-button label="添加" type="primary" icon="el-icon-plus" @click="add"></mt-button>
            </shiro:hasPermission>
            <shiro:hasPermission name="basicHonorRoll:del">
                <mt-button label="批量删除" icon="el-icon-delete" @click="del"></mt-button>
            </shiro:hasPermission>
        </mt-toolbar>

        <!--查询条件-->
        <mt-search-form>
            <mt-form :col="3" :model="form">
                <mt-form-item label="班级名称">
                    <el-input v-model="form.className" placeholder="班级名称"></el-input>
                </mt-form-item>
                <mt-form-item>
                    <mt-button type="primary" icon="el-icon-search" label="查询" @click="search"></mt-button>
                </mt-form-item>
            </mt-form>    
        </mt-search-form>
        <!-- 列表界面内容区域 -->
        <mt-list-content>
            <mt-table :data="grid.data" :height="grid.height" @selection-change="checkbox">
                 <!-- 多选框 -->
                <el-table-column type="selection" width="55"></el-table-column>
                <!-- 单行操作按钮 -->
                <el-table-column label="操作" width="120" align="center" :resizable="false">
                    <template slot-scope="scope">
                        <el-link type="primary" @click.prevent="goview(scope.row.id)">查看</el-link>
                        <el-divider direction="vertical"></el-divider>
                        <el-link type="primary" @click.prevent="goedit(scope.row.id)">编辑</el-link>
                        <el-divider direction="vertical"></el-divider>
                        <el-link type="primary" @click="delSingle(scope.row.id)">删除</el-link>
                    </template>
                </el-table-column>
                <!--视业务进行更改-begin-->
                <el-table-column prop="title" label=""></el-table-column>
                <el-table-column prop="content" label=""></el-table-column>
                <el-table-column prop="reserveField1" label=""></el-table-column>
                <el-table-column prop="sex" label="性别">
                    <template slot-scope="scope">
                        {{scope.row.sex == 1 ? "男" : scope.row.sex == 2 ? "女" : "未知"}}
                    </template>
                </el-table-column>
                <!--视业务进行更改-end-->
            </mt-table>
            <!-- 分页 -->
            <mt-page :current-page="grid.curPage" :page-sizes="grid.pageSizes" :page-size="grid.pageSize"
                 :total="grid.total"
                 @size-change="sizeChange" @current-change="currentChange"></mt-page>
        </mt-list-content>
    </div>
    <script>
        //初始化数据，必须放置在列表页面封装部分前
        function initVueOption(obj) {
            //设置控制器
            obj.data.controller = "${ctx}/basic/basichonorroll";
            //设置查询条件默认值
            obj.data.form = {
            }
        }
    </script>
    </body>
    </html>